package org.sumkid.service;

import org.sumkid.dto.UserDTO;
import org.sumkid.entity.User;

import java.util.List;

/**
 * Default Description
 *
 * @author sumkid
 * @since 2022/10/2
 */
public interface UserService {
    long update(Long id, Integer age);

    Long delete(Long id);

    User queryById(Long userId);

    /**
     * BooleanBuilder 构建动态查询条件
     * @param queryUser
     * @return
     */
    List<User> queryByBooleanBuilder(User queryUser);

    /**
     * 子查询的使用
     * @param managerId
     * @return
     */
    List<User> queryWithSubQuery(Long managerId);

    List<UserDTO> queryWithJoin(Long managerId);

    void queryOther();
}
